package router

import (
	"github.com/gin-gonic/gin"
	"go_api/api"
	"go_api/middleware"
)

func init() {
	RegisterRoute(func(engine *gin.Engine) {
		v1 := engine.Group("/v1")
		// 用户认证路由组
		group := v1.Group("/project")
		{
			group.GET("/list", middleware.ApiMiddleware(), api.ProjectController{}.GetProjectList)
			group.POST("/create", middleware.ApiMiddleware(), api.ProjectController{}.CreateProject)
			group.POST("/create_menu", middleware.ApiMiddleware(), api.ProjectController{}.CreateProjectMenu)
			group.GET("/menu_list", middleware.ApiMiddleware(), api.ProjectController{}.GetProjectMenuList)
			group.POST("/del_menu", middleware.ApiMiddleware(), api.ProjectController{}.DeleteProjectMenu)
			group.POST("/edit_menu", middleware.ApiMiddleware(), api.ProjectController{}.EditProjectMenu)
		}
	})
}
